import { developmentUrl } from "../config/env";
import request from "../config/axios";
export const CommodityReviewInterface = (data) => request({
    url: `${developmentUrl}/shop/order/list?page=${data.pages}&limit=${data.limit}&mobile=${data.mobile}&orderSn=${data.orderSn}`,
    method: "GET"
})
export const CommoditySpecificationMain = (data) => request({
    url: `${developmentUrl}/shop/goods/list?page=${data.pages}&limit=${data.limit}&name=${data.name}`,
    method: "GET"
})
export const changeIsOnSaleInterface = (data) => request({ 
    url: `${developmentUrl}/shop/goods/changeIsOnSale?id=${data.id}&isOnSale=${data.isOnSale}`,
    method: "POST",
})

export const searchUnPay = (data) => request({
    url: `${developmentUrl}/shop/order/list?page=${data.pages}&limit=${data.limit}&status=${data.unPay}`,
    method: "GET"
})
// http://localhost:9528/dev-api/shop/order/list?page=1&limit=20&status=unPay
// http://localhost:9528/dev-api/shop/order/export?page=1&limit=20
export const orderExport = (data) => request({
    url: `${developmentUrl}/shop/order/export?page=${data.pages}&limit=${data.limit}`,
    method: "GET"
})
export const shopUserDetailInterface = (data) => request({
    url: `${developmentUrl}/shop/address/list?page=1&limit=20`,
    method: "GET"
})
export const addComment = (data) => request({
    url: `${developmentUrl}/shop/order/comment/id=${data.id}?&message=${data.message}`,
    method: "POST"
})
// http://localhost:9528/dev-api/shop/order/comment/12?message=as
export const addRemarksInterface = (data) => request({
    url: `${developmentUrl}/shop/order/comment/${data.id}?&message=${data.message}`,
    method: "POST"
})
export const operationRecordInterface = (data) => request({
    url: `${developmentUrl}/shop/order//log/queryByIdOrder/12`,
    method: "GET"
})
// http://localhost:9528/dev-api/shop/order/log/queryByIdOrder/12
// addComment:function(idOrder,message){
//     return request({
//       url: '/shop/order/comment/' + idOrder,
//       method: 'post',
//       params: {
//         message: message
//       }
//     })
//   },
// http://localhost:9528/dev-api/shop/address/list?page=1&limit=20&idUser=3
// ${data.pages}&limit=${data.limit}